package components

import (
	"context"
	"fmt"
	"github.com/go-redis/redis/v8"
)

var Redis *redis.Client
var Context = context.Background()

// ReturnRedisPrefix 返回redis前缀
func ReturnRedisPrefix(payload string) string {
	return fmt.Sprintf("i18n_template-%s", payload)
}
func InitRedis() {
	Redis = redis.NewClient(&redis.Options{
		Addr:     "dongsongkeji.com.cn:6379",
		Password: "",
		DB:       0,
	})
}
